<?php
namespace app\user\model;

use app\user\model\Unit;
use think\Model;
use traits\model\SoftDelete;
class Service_purchase extends Model
{
	//开启软删除
	use SoftDelete;
	//查询是否该店铺
	public function getorder()
	{
		$id=$this->where(['AccountID'=>session('bid')])->select();
		return $id;
	}
	//获取计量单位的name值
	public function getUnitAttr($Unit)
	{
		$menuName = Unit::where(['unid'=>$Unit])->field(['type'])->find()['type'];
		return $menuName;
	}
}